package org.itheima.service.impl;

import org.itheima.mapper.WarningsMapper;
import org.itheima.service.WarningsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class WarningsServiceImpl implements WarningsService {

    @Autowired
    WarningsMapper warningsMapper;


    @Override
    public void addWarnings(int user_id, String message, int issued_by) {
        warningsMapper.addWarnings(user_id,message,issued_by);
    }

    @Override
    public List<Map<String, Object>> findById(int user_id) {
        return  warningsMapper.findById(user_id);
    }
}
